-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reuse FSSpecTarget
Auth Credentials
#668
Conversation
FSSpecTarget
Auth Credentials In Dep Injection Workflows
e86ee27
to
599359f
Compare
FSSpecTarget
Auth Credentials In Dep Injection WorkflowsFSSpecTarget
Auth Credentials
FSSpecTarget
Auth CredentialsFSSpecTarget
Auth Credentials
68b2a5b
to
c1f6ae9
Compare
pangeo_forge_recipes/combiners.py
Outdated
@@ -65,7 +65,7 @@ class CombineMultiZarrToZarr(beam.CombineFn): | |||
along a dimension that does not exist in the individual inputs. In this latter | |||
case, precombining adds the additional dimension to the input so that its | |||
dimensionality will match that of the accumulator. | |||
:param storage_options: Storage options dict to pass to the MultiZarrToZarr | |||
:param target_options: Storage options dict to pass to the MultiZarrToZarr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docstring following target_options
still reads Storage options.
pangeo_forge_recipes/storage.py
Outdated
elif isinstance(fsspec_protocol, list): | ||
return fsspec_protocol[0] | ||
else: | ||
raise ValueError("could not resolve fsspec protocol from underlying filesystem") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could return what fsspec_protocol is in the ValueError if it isn't caught by any of the isinstance checks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
@@ -466,9 +465,6 @@ class WriteReference(beam.PTransform, ZarrWriterMixin): | |||
will be appended to this prefix to create a full path. | |||
:param output_file_name: Name to give the output references file | |||
(``.json`` or ``.parquet`` suffix). | |||
:param target_options: Storage options for opening target files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So nice to get rid of all of these
@@ -46,14 +46,14 @@ def test_xarray_zarr( | |||
| beam.Create(pattern.items()) | |||
| OpenWithXarray(file_type=pattern.file_type) | |||
| StoreToZarr( | |||
target_root=tmp_target_url, | |||
target_root=tmp_target, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad this works!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @ranchodeluxe! Nice to remove all of the super nested fsspec stuff being passed around. Left a few minor comments.
a94d527
to
6979092
Compare
@cisaacstern: gonna merge this since we talked about getting our kerchunk recipes squared away today |
Addresses #666
Goal was to remove storage options from being passed in
WriteCombinedReference
b/c we already had access to thetarget_root
being dep injected. But then for all nestedfsspec
instantiations withinWriteCombinedReference
we had to figure out how to return the original fsspec options fromtarget_root
and pass them alongCompanion PR in Runner
pangeo-forge/pangeo-forge-runner#163
Release Steps
FSSpecTarget
Auth Credentials pangeo-forge-runner#163 firstpangeo-forge-runner
0.9.3 releasepangeo-forge-runner==0.9.3